@import "@/app/styles";

.SearchingPanel {
  $this: &;
  display: flex;
  align-items: center;
  position: relative;
  max-width: 200px;
  width: 100%;
  background-color: transparent;

  &-Form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
  }

  &-InputWrapper {
    padding: 0;
    width: 100%;
    height: 43px;
    background-color: transparent;
  }

  &-Input {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.25;
    margin: 0;
    padding: 0 50px 0 16px;
    width: 100%;
    height: 42px;
    border: 1px solid $color-light-gray;
    border-radius: $border-radius;
    background-color: $color-white;
    outline: transparent;
    transition: all $transition;

    &::placeholder {
      background-color: transparent;
      color: $color-text;
    }
  }

  &-Icon {
    position: absolute;
    right: 15px;
    width: 24px;
    height: 24px;
  }

  &__active {
    width: 100%;

    #{$this}-Input {
      background-color: transparent;
      border: 1px solid $color-primary;
    }
  }
}

.theme-dark {
  .SearchingPanel {
    &-Input {
      background-color: $color-darkness;
      border: 1px solid $color-nightSky;
      color: $color-white;

      &::placeholder {
        color: $color-white;
      }
    }

    &__active {
      .SearchingPanel-Input {
        border: 1px solid $color-primary;
      }
    }
  }
}
